package com.henu.xyh.fragmentofXYH;


import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RadioButton;
import com.henu.R;
import com.henu.tanhang.Map;
import com.henu.xyh.Confession_WallActivity;
import com.henu.yizhiya.util.BuildingActivity;
import com.henu.zmb.Goods_MainActivity;
import com.henu.zmb.LoseGoods_MainActivity;

/**
 * A simple {@link Fragment} subclass.
 */
public class Campus extends Fragment {


    public Campus() {

    }


    private RadioButton btn_express;
    private RadioButton btn_secondhand;
    private RadioButton btn_lose;
    private RadioButton btn_map;
    private RadioButton btn_room;
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view=inflater.inflate(R.layout.fragment_fragment2,null);
        btn_express= (RadioButton) view.findViewById(R.id.btn_express);
        btn_express.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent=new Intent(getActivity(),Confession_WallActivity.class);
                startActivity(intent);
            }
        });
        btn_secondhand= (RadioButton) view.findViewById(R.id.btn_secondhandmarket);
        btn_secondhand.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent=new Intent(getActivity(),Goods_MainActivity.class);
                startActivity(intent);
            }
        });
        btn_lose= (RadioButton) view.findViewById(R.id.btn_loseandlost);
        btn_lose.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent=new Intent(getActivity(),LoseGoods_MainActivity.class);
                startActivity(intent);
            }
        });
        btn_map= (RadioButton) view.findViewById(R.id.btn_map);
        btn_map.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), Map.class);
                startActivity(intent);
            }
        });
        btn_room= (RadioButton) view.findViewById(R.id.btn_room);
        btn_room.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), BuildingActivity.class);
                startActivity(intent);
            }
        });
        return view;
    }

}
